<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::any('/', [\App\Http\Controllers\ManageController::class, 'index']);

Route::prefix('/v1')->group(function () {
    Route::middleware(\App\Http\Middleware\CheckToken::class)->group(function (){
        //设备认证
        Route::post('/query_equip_auth', [\App\Http\Controllers\ChargeController::class, 'queryEquipAuth']);
        //开始充电
        Route::post('/query_start_charge', [\App\Http\Controllers\ChargeController::class, 'queryStartCharge']);
        //结束充电
        Route::post('/query_stop_charge', [\App\Http\Controllers\ChargeController::class, 'queryStopCharge']);
        //查询充电状态
        Route::post('/query_equip_charge_status', [\App\Http\Controllers\ChargeController::class, 'queryEquipChargeStatus']);
        //查询电站信息
        Route::post('/query_stations_info', [\App\Http\Controllers\StationController::class, 'queryStationsInfo']);
        //设备接口状态查询
        Route::post('/query_station_status', [\App\Http\Controllers\StationController::class, 'queryStationStatus']);
        //查询业务策略信息
        Route::post('/query_equip_business_policy', [\App\Http\Controllers\StationController::class, 'queryEquipBusinessPolicy']);
    });
    //token认证
    Route::post('/query_token', [\App\Http\Controllers\ChargeController::class, 'queryToken'])->name('query_token');
});

